package com.lu.core.annotations;

import com.lu.core.auto.DataScopeConfigureSelector;
import com.lu.core.support.DataScopePermissionAbstract;
import org.springframework.context.annotation.AdviceMode;
import org.springframework.context.annotation.Import;

import java.lang.annotation.*;

/**
 * @program sample-demo
 * @description: 开启rcs日志
 * @author: zhanglu
 * @create: 2021-03-10 18:37:00
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Import(DataScopeConfigureSelector.class)
public @interface EnableDataScope {

    /**
     * 平台
     *  采集的标志位，有值则采集；无则不采集
     */
    String platform();

    /**
     * 处理类
     * @return
     */
    Class<? extends DataScopePermissionAbstract>[] handlers();

    /**
     * Indicate how caching advice should be applied. The default is
     * {@link AdviceMode#PROXY}.
     *
     * @return 代理方式
     * @see AdviceMode
     */
    AdviceMode mode() default AdviceMode.PROXY;

}
